package com.tenny.bookstore.dao.impl

import com.tenny.bookstore.bean.Book
import com.tenny.bookstore.dao.BookDao
import org.junit.Test

/**
 * Created by Tenney on 2017/3/16.
 */
class BookDaoImplTest {
    @org.junit.Test
    public void findPageBooks() throws Exception {
        BookDao bookDao=new BookDaoImpl();
        def books = bookDao.findPageBooks(0, 10);
        System.out.print(books.toString());

    }

    @org.junit.Test
    public void findAllBooksNumber() throws Exception {

    }

    @org.junit.Test
    public void findAll() throws Exception {

    }

    @org.junit.Test
    public void save() throws Exception {
        Book book=new Book();
        book.setAuthor("王小二");
        book.setCategoryId("1234");
        book.setDescription("very good");
        book.setId("1111");
        book.setName("挪威的森林");
        book.setPath("4/5");
        book.setPhotoFileName("1.png");
        book.setPrice(111.0);
        BookDao dao=new BookDaoImpl();
        dao.save(book);

    }

    @org.junit.Test
    public void findById() throws Exception {

    }

    @Test
    public void findPageBooks1() throws Exception {

    }
}
